<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="text/javascript" src="jquery-3.2.1.js"></script>
    <title>jq动画</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        list-style: none;
        text-decoration: none;
    }
    
    ul li {
        width: 100px;
        height: 100px;
        background-color: yellowgreen;
        font-size: 16px;
        padding: 20px;
        transition: all 3s;
    }
    
    .lib.rotate {
        transform: rotateZ(360deg);
        background-color: red;
    }
</style>

<body>
    <ul>
        <li>偶买噶</li>
        <li class="lib">旋转偶买噶</li>
    </ul>
</body>
<script>
    $(function() {
        var li = $("ul li");
        var lib = $(".lib");
        li.eq(0).on("mouseenter", function(e) {
            li.eq(0).animate({
                width: 300,
                height: 300,
                fontSize: 40,

            }, 1000, function() {
                li.css("display", "block");
            });
        })
        li.eq(0).on("mouseleave", function(e) {
            li.eq(0).animate({
                width: 100,
                height: 100,
                fontSize: 16,

            }, 1000, function() {
                li.css("display", "block");
            });
        })
        li.eq(1).on("mouseenter", function(e) {
            lib.addClass("rotate");
        })
    })
</script>

</html>